import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            name:'Login',
            component:()=>import('../components/page/Login'),
            meta: { title: '登录界面' }
        },
        {
            path: '/main',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [


                {
                    path: '/user',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/User.vue'),
                    meta: { title: '用户表' }
                },
                {
                    path: '/address',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Details.vue'),
                    meta: { title: '秒杀活动' }
                },
                {
                    path: '/role',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Role'),
                    meta: { title: '角色' }
                },
                {
                    path: '/role',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Goods'),
                    meta: { title: '手机信息' }
                },

                {
                    path: '/booktype',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/activeity_details.vue'),
                    meta: { title: '秒杀活动' }
                },


                {
                    // 富文本编辑器组件
                    path: '/editor',
                    component: () => import(/* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
                    meta: { title: '富文本编辑器' }
                },
                {
                    // markdown组件
                    path: '/markdown',
                    component: () => import(/* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
                    meta: { title: 'markdown编辑器' }
                },
                {
                    // 图片上传组件
                    path: '/upload',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
                    meta: { title: '文件上传' }
                },

                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/Country',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/Country.vue'),
                    meta: { title: '城市' }
                },


                {
                    path: '/Emp',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Emp.vue'),
                    meta: { title: '员工' }
                },
                {
                    path: '/Orderindo',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Orderindo.vue'),
                    meta: { title: '订单' }
                },
                {
                    path: '/Purchase',
                    component: () => import(/* webpackChunkName: "donate" */ '../components/page/Purchase.vue'),
                    meta: { title: '采购信息' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
